package com.runvp.controller;

import com.runvp.common.core.domain.AjaxResult;
import com.runvp.common.model.tcp.MessageReceiveBody;
import com.runvp.handler.CmdFeeHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Slf4j
@Controller
@ResponseBody
@RequestMapping("/app/cmd")
public class FeeController {


    @Autowired
    private CmdFeeHandler cmdFeeHandler;
    /**
     *  设备请求收费方案 -服务器响应
     */
    @PostMapping("/fee")
    public AjaxResult xl(@RequestBody MessageReceiveBody receiveBody) {
        return AjaxResult.success(cmdFeeHandler.handle(receiveBody));
    }


}
